<template>
    <div class="test">
        <input type="text" value="" v-model="id">id
        <input type="text" value="" v-model="name">name
        <input type="button" value="toggle1" @click="toggle1">
    </div>
</template>

<script>
    export default {
        name: 'Son',
        data() {
            return {
                id:"",
                name:""
            }
        },
        methods: {
            toggle1() {
                this.$emit("func1", {id:this.id,name:this.name})
                this.id=""
                this.name=""

            }
        }
    }
</script>